<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Library.pb</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<pre><font face="Courier New, Courier, mono"size="2"><font color="#006666">;
</font><font color="#006666">; ------------------------------------------------------------
</font><font color="#006666">;
</font><font color="#006666">;   PureBasic - Library
</font><font color="#006666">;
</font><font color="#006666">;    (c) Fantaisie Software
</font><font color="#006666">;
</font><font color="#006666">; ------------------------------------------------------------
</font><font color="#006666">;
</font>
<b><font color="#006666">CompilerSelect</font></b> <font color="#924B72">#PB_Compiler_OS</font> 
  
  <b><font color="#006666">CompilerCase</font></b> <font color="#924B72">#PB_OS_Windows</font>

      <b><font color="#006666">If</font></b> <font color="#006666">OpenLibrary</font>(0, "USER32.DLL")
      
        *MessageBox =<font color="#006666"> GetFunction</font>(0, "MessageBoxA")
        <b><font color="#006666">If</font></b> *MessageBox
<font color="#006666">          CallFunctionFast</font>(*MessageBox, 0, @"Body", @"Title", 0)
        <b><font color="#006666">EndIf</font></b>
        
<font color="#006666">        CloseLibrary</font>(0)
      <b><font color="#006666">EndIf</font></b>


  <b><font color="#006666">CompilerCase</font></b> <font color="#924B72">#PB_OS_Linux</font>

      <b><font color="#006666">If</font></b> <font color="#006666">OpenLibrary</font>(0, "libc.so")
      
        *MAlloc =<font color="#006666"> GetFunction</font>(0, "malloc")
        <b><font color="#006666">If</font></b> *MAlloc
          *Buffer =<font color="#006666"> CallCFunctionFast</font>(*MAlloc, 128)
          <b><font color="#006666">If</font></b> *Buffer
            <b><font color="#006666">Debug</font></b> "Buffer allocated"

<font color="#006666">            CallCFunction</font>(0, "free", *Buffer)

          <b><font color="#006666">EndIf</font></b>
        <b><font color="#006666">EndIf</font></b>
      
<font color="#006666">        CloseLibrary</font>(0)
      <b><font color="#006666">EndIf</font></b>

<b><font color="#006666">CompilerEndSelect</font></b>
</font></pre>
</body></html>
